package com.interceptor.action;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class TestInterceptor implements Interceptor {
    private static final long serialVersionUID = 1L;

    /**
     * 实现的方法
     */
    public void init() {
        System.out.println("this is init");
    }

    /**
     * 实现的方法
     */
    public void destroy() {
        System.out.println("this is destroy");
    }

    /**
     * 实现的方法
     */
    public String intercept(ActionInvocation invocation) throws Exception {
        System.out.println("this is intercepter");
        String result = invocation.invoke();
        return result;
    }
}
